﻿using AutoMapper;
using ABP.TPLMS.Entitys;

namespace ABP.TPLMS.Books.Dto
{
    public class BookMapProfile : Profile
    {
        public BookMapProfile()
        {
            CreateMap<BookDto, Book>();
            CreateMap<Book, BookDto>();
            //CreateMap<BookDto, Book>()
            //    .ForMember(x => x.Roles, opt => opt.Ignore())
            //    .ForMember(x => x.CreationTime, opt => opt.Ignore());

            CreateMap<CreateUpdateBookDto, Book>();
            CreateMap<Book, CreateUpdateBookDto>();
            //CreateMap<CreateBookDto, Book>().ForMember(x => x.Roles, opt => opt.Ignore());
        }
    }
}
